home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20021006-20030409
/
000039_fdc@columbia.edu_Tue Oct 29 10:05:57 EST 2002.msg
< prev
next >
Wrap
Text File
|
2003-04-08
|
3KB
|
77 lines
Article: 13802 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: redirect io to external cmd (like cu "~|cmd" and "~$cmd")
Date: 29 Oct 2002 10:05:46 -0500
Organization: Columbia University
Lines: 60
Message-ID: <apm84a$im0$1@watsol.cc.columbia.edu>
References: <86c66124.0210280643.30d17ab6@posting.google.com> <apjj8d$pk3$1@watsol.cc.columbia.edu> <86c66124.0210290137.a992437@posting.google.com>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1035903947 10209 128.59.39.139 (29 Oct 2002 15:05:47 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 29 Oct 2002 15:05:47 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13802
In article <86c66124.0210290137.a992437@posting.google.com>,
<pytcayrn@freemail.hu> wrote:
: Thanks a lot, that's exactly what I was looking for.
:
: I managed to log the output to a file, and then "tail -f" the file to
: "od", so this solved my problem. BTW logging the output to "|od >
: session.log" failed for me (the "od" process didn't even show up in
: "ps -ef"). I guess I well escaped the space characters with an "\".
:
It works fine here. Maybe you need C-Kermit 8.0:
http://www.columbia.edu/kermit/ckermit.html
: I few other questions that I would be very happy to get some answer:
: How can I stop kermit to print the data to the screen, so that the
: data should only be printed to the session.log file?
:
Most messages are surpressed if you start Kermit with "-q" on the command
line or tell it to "set quiet". But that doesn't apply to CONNECT mode.
If you don't anything to appear on the screen, then don't enter CONNECT
mode. One way to do this would be:
set port /dev/tty0p2
set speed 57600 ; or whatever
set flow rts/cts ; or whatever
set session log binary
log session "|od -tx1 > session.log"
input <sec> <string>
The INPUT command is described as follows (by C-Kermit 8.0 "help input"):
Syntax: INPUT { number-of-seconds, time-of-day } [ text ]
Example: INPUT 5 Login: or INPUT 23:59:59 RING
Waits up to the given number of seconds, or until the given time of day
for the given text to arrive on the connection. If no text is given,
INPUT waits for any character. For use in script programs with IF
FAILURE and IF SUCCESS. Also see MINPUT, REINPUT, SET INPUT. See HELP
PAUSE for details on time-of-day format. The text, if given, can be a
\pattern() invocation, in which case it is treated as a pattern rather
than a literal string (HELP PATTERNS for details). If the timeout
interval is 0, the INPUT command does not wait; i.e. the given text must
already be available for reading for the INPUT command to succeed. If
the interval is negative, the INPUT command waits forever.
: Does kermit have an echo-like built-in function with which I could
: send binary data to the serial line from kermit prompt, e.g. "echo
: 0xFF,0x1D,0xB3" while the connection is alive and data is dumped to
: session.log ?
:
The OUTPUT command ("help output" for more info). Example:
output \xff\x1d\xb3
: I am trying to communicate with a GPS receiver :)
:
You might find some of the examples in our script library helpful:
http://www.columbia.edu/kermit/ckscripts.html
- Frank